package com.rstrulak.main;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.rstrulak.dao.RoleDao;

public class Start {

	public static void main(String[] args) {

		
		ApplicationContext ac = new ClassPathXmlApplicationContext(
				"spring/applicationContext.xml");
		RoleDao roleDao = (RoleDao) ac.getBean("roleDao");
		System.out.println(roleDao.getById(1l));
		((ConfigurableApplicationContext) ac).close();
	}
}
